package com.itheima.consumer.controller;

import com.itheima.mian.service.api.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController  {

    @Reference  // 注册服务到zookeeper
    public UserService userService;

    @RequestMapping("hello")
    public String hello(String name) {
        String s = userService.sayHello(name);
        return "hello" + s;
    }
}
